<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>上传资料</title>

    <script th:src="@{/bootstrap/js/jquery-1.11.2.min.js}"></script>
    <link rel="stylesheet" th:href="@{/bootstrap4/bootstrap.css}">

    <script th:src="@{/bootstrap4/bootstrap.js}"></script>

    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>

    <link rel="stylesheet" th:href="@{/css/com/message.css}">
    <link rel="stylesheet" th:href="@{/font/message/iconfont.css}">
    <link rel="stylesheet" th:href="@{/css/student/selectAdviser.css}">
</head>
<body>

<div th:replace="~{components/com::admin-topbar}"></div>
<div th:replace="~{components/side-menu::size-menu-bar}"></div>


<div class="container">

    <div class="title" style="width: 100%; align-items: center; margin: 30px 0;">
        <h2 style="display: flex; align-items: center; justify-content: center;">填写信息</h2>
    </div>

    <form id="edit-form">
        <input hidden="hidden" class="form-control" name="id" id="id" th:value="${info.getId()}">
        <div class="form-group row" style="margin-bottom: 25px;">
            <label class="col-sm-2 col-form-label">导师姓名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" th:value="${info.getTeacher().getName()}" disabled>
            </div>
        </div>

        <div class="form-group row" style="margin-bottom: 25px;">
            <label class="col-sm-2 col-form-label">学生姓名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" th:value="${info.getStudent().getName()}" disabled>
            </div>
        </div>
        <div class="form-group row" style="margin-bottom: 25px;">
            <label class="col-sm-2 col-form-label">学生学号</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" th:value="${info.getStudent().getNumber()}" disabled>
            </div>
        </div>
        <div class="form-group row" disabled style="margin-bottom: 25px;">
            <label class="col-sm-2 col-form-label">学期</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" th:value="${info.getSemester().getName()}" disabled>
            </div>
        </div>

        <!-- TODO 这里是资料预览界面 -->
<!--        <div class="form-group">-->
<!--            <label for="exampleFormControlFile1">资料</label>-->
<!--            <input type="file" name="file" class="form-control-file" id="exampleFormControlFile1">-->
<!--        </div>-->
        <div class="form-group">
            <label for="intro">学生自我介绍</label>
            <textarea class="form-control" id="intro" rows="3" th:text="${info.getIntro()}" name="intro" disabled></textarea>
        </div>
        <div class="form-group">
            <label for="selectAppTeacher">选择评阅教师</label>
            <select class="form-control" id="selectAppTeacher" name="teacherId" >
                <option value="">请选择</option>
                <option th:each="teacher:${teachers}" th:if="${teaId} != ${teacher.getId()}" th:value="${teacher.getId}" th:text="${teacher.getId()} + ' : ' + ${teacher.getName()}" th:selected="${appTeaId} == ${teacher.getId()}"></option>
            </select>
        </div>

        <div class="form-group">
            <label for="suggestion">意见:</label>
            <textarea class="form-control" id="suggestion" rows="3" th:text="${info.getSuggestion()}" name="suggestion"></textarea>
        </div>
        <div class="form-group row" style="margin-bottom: 25px; padding: 0 10px">
            <button type="submit" style="width: 100%;" class="btn btn-primary">提交</button>
        </div>

    </form>

</div>
</body>
<script type="module" th:src="@{/js/teacher/confirmStudentEdit.js}"></script>
</html>